package com.frogs.ucenter.v1.request;

import javax.servlet.http.HttpServletRequest;

import com.frogs.framework.web.HttpRequestInfo;
import com.frogs.system.util.ApiUrlParamEnum;
import com.frogs.system.web.api.request.Request;
import com.frogs.system.web.exception.RequestIllegalException;

public class UserAttentionRequestLogAddRequest extends Request{

	private static final long serialVersionUID = 4048711798060105719L;

	private Integer id;
	private Integer sendUserId;
	private Integer operatorUserId;
	private Integer status;
	
	@Override
	public void parse(HttpServletRequest request) {
		HttpRequestInfo requestInfo = new HttpRequestInfo(request);
		this.id = requestInfo.getIntParameter(ApiUrlParamEnum.id.getParamName(), 0);
		this.sendUserId = requestInfo.getIntParameter(ApiUrlParamEnum.sendUserId.getParamName(), 0);
		this.operatorUserId = requestInfo.getIntParameter(ApiUrlParamEnum.operatorUserId.getParamName(), 0);
		this.status = requestInfo.getIntParameter(ApiUrlParamEnum.status.getParamName(), 0);
		
		if (sendUserId < 1) {
			throw new RequestIllegalException("error senderUserId:"+"发送人id有误");
		}
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getSendUserId() {
		return sendUserId;
	}

	public void setSendUserId(Integer sendUserId) {
		this.sendUserId = sendUserId;
	}

	public Integer getOperatorUserId() {
		return operatorUserId;
	}

	public void setOperatorUserId(Integer operatorUserId) {
		this.operatorUserId = operatorUserId;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}
	
}
